home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C
/
Applications
/
MacGzip 1.0
/
source
/
Mac
/
Prefs.h
< prev
next >
Wrap
Text File
|
1995-09-18
|
3KB
|
136 lines
/*
* Prefs.h
* (C) SPDsoft, August 13, 1995
*
* Prefs struct definition and constants
*/
#ifndef __PREFS_H__
#define __PREFS_H__
#ifndef __ALIASES__
#include <Aliases.h>
#endif
#define kCurrentPrefsTypeVers 7 /* and hopefully last */
#if GENERATINGPOWERPC || PRAGMA_ALIGN_SUPPORTED || defined(powerc) || defined (__powerc)
#pragma options align=mac68k
#endif
typedef struct
{
Boolean Force;
Boolean NoName;
Boolean Name;
Boolean UseCustomSuffix;
Boolean GunzipSuffix;
char unused_byte;
long Level;
Str255 Suffix;
long unused[4];
} gzip_prefs;
typedef struct
{
Boolean Keys;
Boolean IC;
Boolean IC_ASCII;
Boolean IC_NotMB;
short ResFork;
short Mode;
Boolean Mode_a;
char unused_byte;
long unused[4];
}Compress_prefs;
typedef struct
{
Boolean Keys;
Boolean IC;
Boolean Fetch;
Boolean TryMB;
OSType TextCreator;
OSType BinType;
OSType BinCreator;
short Mode;
long unused[4];
}Decompress_prefs;
typedef struct
{
short RecurseMode;
Boolean UseDestFolder;
char unused_byte;
short folderAliasID; /* resource ID for saving alias of selected file */
long unused[4];
}Folder_prefs;
typedef struct
{
Boolean KeepOriginal;
Boolean BeepWhenDone;
Boolean QuitWhenDone;
Boolean Keys;
short DefaultOp;
long unused[4];
}Misc_prefs;
typedef struct
{
long prefsTypeVers; /* version number of prefs struct */
Boolean SavedPos;
char unused_byte;
Point SavedPoint;
gzip_prefs gzip;
Compress_prefs Compress;
Decompress_prefs Decompress;
Folder_prefs Folder;
Misc_prefs Misc;
} PrefsType, *PrefsTypePtr;
#if PRAGMA_ALIGN_SUPPORTED || defined(powerc) || defined (__powerc)
#pragma options align=reset
#endif
/* Same as Menu items */
#define kComp_RFAsk 1
#define kComp_RFMB 2
#define kComp_RFNot 3
#define kComp_RFQuit 4
#define kComp_MASCII 1
#define kComp_MBin 2
#define kComp_MMB 3
#define kDeco_MASCII 1
#define kDeco_MBin 2
#define kMisc_unknown 0
#define kMisc_gzip 1
#define kMisc_gunzip 2
#define kMisc_auto 3
/* Same as Button items */
#define kFold_FNot 1
#define kFold_FFold 2
#define kFold_FAll 3
/******************************************************************************
*
* Globals
*/
extern PrefsType gPrefs;
Boolean GetOrGeneratePrefs(PrefsType * thePrefsTypePtr, AliasHandle * fileAliasHandlePtr, long wantedVers );
OSErr SavePrefs(PrefsType * thePrefsTypePtr, AliasHandle * fileAliasHandlePtr );
short OpenPrefsResFile(SignedByte prefsPerm, Boolean createFlag, short StrID);
#endif